EpiCompare compares epigenetic datasets for quality control and benchmarking purposes. The report consists of three sections:

  1. General Metrics: Metrics on peaks (percentage of blacklisted and non-standard peaks, and peak widths) and fragments (duplication rate) of samples.
  2. Peak Overlap: Percetnage and statistical significance of overlapping and non-overlapping peaks. Also includes upset plot.
  3. Functional Annotation: Functional annotation (ChromHMM, ChIPseeker and enrichment analysis) of peaks. Also includes peak enrichment around TSS.

Input Datasets
  • Reference peakfile: H3K36me3_H9_E1_MINT_IR12
  • Total of 18 peak files:
## [1] "File1: H3K36me3_K562_E1_IRpseudo12"
## [1] "File2: H3K36me3_K562_E1_IRpseudo1"
## [1] "File3: H3K36me3_K562_E1_IRpseudo2"
## [1] "File4: H3K36me3_K562_E1_IR12"
## [1] "File5: H3K36me3_K562_E2_IRpseudo12"
## [1] "File6: H3K36me3_K562_E2_IRpseudo1"
## [1] "File7: H3K36me3_K562_E2_IRpseudo2"
## [1] "File8: H3K36me3_K562_E2_IR12"
## [1] "File9: H3K36me3_A549_E1_IRpseudo12"
## [1] "File10: H3K36me3_A549_E1_IRpseudo1"
## [1] "File11: H3K36me3_A549_E1_IR12"
## [1] "File12: H3K36me3_A549_E2_IRpseudo12"
## [1] "File13: H3K36me3_A549_E2_IRpseudo1"
## [1] "File14: H3K36me3_A549_E2_IR12"
## [1] "File15: H3K36me3_H9_E1_MINT_IRpseudo12"
## [1] "File16: H3K36me3_H9_E1_MINT_IRpseudo1"
## [1] "File17: H3K36me3_H9_E1_MINT_IRpseudo2"
## [1] "File18: H3K36me3_H9_E1_MINT_IR12"
Code
EpiCompare(peakfiles = list(H3K36me3_K562_E1_IRpseudo12, H3K36me3_K562_E1_IRpseudo1, H3K36me3_K562_E1_IRpseudo2, H3K36me3_K562_E1_IR12, H3K36me3_K562_E2_IRpseudo12, H3K36me3_K562_E2_IRpseudo1, H3K36me3_K562_E2_IRpseudo2, H3K36me3_K562_E2_IR12, H3K36me3_A549_E1_IRpseudo12, H3K36me3_A549_E1_IRpseudo1, H3K36me3_A549_E1_IR12, H3K36me3_A549_E2_IRpseudo12, H3K36me3_A549_E2_IRpseudo1, H3K36me3_A549_E2_IR12, H3K36me3_H9_E1_MINT_IRpseudo12, H3K36me3_H9_E1_MINT_IRpseudo1, H3K36me3_H9_E1_MINT_IRpseudo2, H3K36me3_H9_E1_MINT_IR12),
           genome_build = hg38,
           blacklist = blacklist,
           picard_files = list(),
           reference = H3K36me3_H9_E1_MINT_IR12,
           stat_plot = FALSE,
           chromHMM_plot = FALSE,
           chromHMM_annotation = "K562",
           chipseeker_plot = FALSE,
           enrichment_plot = FALSE,
           interact = TRUE,
           save_output = TRUE,
           output_dir = "/Users/xindong/Downloads/H3K36me3")

1. General Metrics

Peak Information

Column Description:

  • PeakN before tidy: Total number of peaks including those blacklisted and those in non-standard chromosomes.
  • Blacklisted peaks removed (%): Percentage of blacklisted peaks in samples. E.g. ENCODE hg19 blacklist includes regions in the hg19 genome that have anomalous and/or unstructured signals independent of the cell-line or experiment.
  • Non-standard peaks removed (%): Percentage of peaks in non-standard and/or mitochondrial chromosomes. Identified using BRGenomics::tidyChromosomes().
  • PeakN after tidy: Total number of peaks after removing those in blacklisted regions and non-standard chromosomes.

NB: EpiCompare uses filtered peakfiles (i.e. datasets after removing peaks in blacklisted regions and non-standard chromosomes)


Sample PeakN before tidy Blacklisted peaks removed (%) Non-standard peaks removed (%) PeakN after tidy
H3K36me3_K562_E1_IRpseudo12 74176 0 0 74176
H3K36me3_K562_E1_IRpseudo1 71480 0 0 71480
H3K36me3_K562_E1_IRpseudo2 52817 0 0 52817
H3K36me3_K562_E1_IR12 74347 0 0 74347
H3K36me3_K562_E2_IRpseudo12 92338 0 0 92338
H3K36me3_K562_E2_IRpseudo1 92840 0 0 92840
H3K36me3_K562_E2_IRpseudo2 52158 0 0 52158
H3K36me3_K562_E2_IR12 96286 0 0 96286
H3K36me3_A549_E1_IRpseudo12 136039 0 0 136039
H3K36me3_A549_E1_IRpseudo1 147538 0 0 147538
H3K36me3_A549_E1_IR12 62223 0 0 62223
H3K36me3_A549_E2_IRpseudo12 91433 0 0 91433
H3K36me3_A549_E2_IRpseudo1 86855 0 0 86855
H3K36me3_A549_E2_IR12 68184 0 0 68184
H3K36me3_H9_E1_MINT_IRpseudo12 253649 0 0 253649
H3K36me3_H9_E1_MINT_IRpseudo1 243359 0 0 243359
H3K36me3_H9_E1_MINT_IRpseudo2 179440 0 0 179440

Fragment Information

Metrics on fragments is shown only if Picard summary is provided. See manual for help.

Column Description:

  • Mapped_Fragments: Number of mapped read pairs in the file.
  • Duplication_Rate: Percentage of mapped sequence that is marked as duplicate.
  • Unique_Fragments: Number of mapped sequence that is not marked as duplicate.


|| || || ||


Peak widths

Distribution of peak widths in samples



2. Peak Overlap

Percentage Overlap

Percentage of overlapping peaks between samples. Hover over heatmap for percentage values.

N.B. How to interpret heatmap: [Samples in x-axis of heatmap] peaks in [Samples in y-axis of heatmap] peaks



Upset Plot

Upset plot of overlapping peaks between samples. See here on how to interpret the plot.


Statistical Significance

Depending on the format of the reference file, EpiCompare outputs different plots:

  • Reference dataset has BED6+4 format (peakcalling performed with MACS2): EpiCompare generates paired boxplot per sample showing the distribution of -log10(q-value) of reference peaks that are overlapping and non-overlapping with the sample dataset.
  • Reference dataset does not have BED6+4 format: EpiCompare generates a barplot of percentage of overlapping sample peaks with the reference, coloured by statistical significance (adjusted p-value) of the overlap.

Reference peakfile: H3K36me3_H9_E1_MINT_IR12

Keys:

  • Overlap: Sample peaks in Reference peaks
  • Unique: Sample peaks not in Reference peaks



3. Functional Annotation

3.1 ChromHMM

ChromHMM annotates and characterises peaks into different chromatin states. ChromHMM annotations used in EpiCompare were obtained from here.

  • Cell-type annotation file used in this analysis: K562

All samples

ChromHMM annotation of individual samples.

[1] “No plot”

Overlap: Sample peaks in Reference peaks

Percentage of Sample peaks found in Reference peaks (Reference peakfile: H3K36me3_H9_E1_MINT_IR12)

ChromHMM annotation of sample peaks found in reference peaks.

Overlap: Reference peaks in Sample peaks

Percentage of Reference peaks found in Sample peaks (Reference peakfile: H3K36me3_H9_E1_MINT_IR12)

ChromHMM annotation of reference peaks found in sample peaks.

Unique: Sample peaks not in Reference peaks

Percentage of sample peaks not found in reference peaks (Reference peakfile: H3K36me3_H9_E1_MINT_IR12)

ChromHMM annotation of sample peaks not found in reference peaks.

Unique: Reference peaks not in Sample peaks

Percentage of reference peaks not found in sample peaks (Reference peakfile: H3K36me3_H9_E1_MINT_IR12)

ChromHMM annotation of reference peaks not found in sample peaks.


3.2 ChIPseeker

EpiCompare uses ChIPseeker::annotatePeak() to annotate peaks with the nearest gene and genomic regions where the peak is located. The peaks are annotated with genes taken from human genome annotations (hg19 or hg38) provided by Bioconductor.


3.3 Functional Enrichment Analysis

EpiCompare performs KEGG pathway and GO enrichment analysis using clusterProfiler. ChIPseeker::annotatePeak() is first used to assign peaks to nearest genes. Biological themes amongst the genes are identified using ontologies (KEGG and GO). The peaks are annotated with genes taken from annotations of human genome (hg19 or hg38) provided by Bioconductor.


KEGG


GO


3.4 Peak Frequency around TSS

This plots peaks that are mapping to transcriptional start sites (TSS). TSS regions are defined as the flanking sequence of the TSS sites. The frequency of peaks in downstream (-3000bp) and upstream (+3000bp) of TSS is plotted. Faint color line around the main frequency line represents the 95% confidence interval estimated by bootstrap method.

## [1] FALSE

4. Session Info

## R version 4.2.1 (2022-06-23)
## Platform: x86_64-apple-darwin17.0 (64-bit)
## Running under: macOS Monterey 12.4
## 
## Matrix products: default
## LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib
## 
## locale:
## [1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
##  [1] EpiCompare_1.0.0  ggpubr_0.4.0      viridis_0.6.2     viridisLite_0.4.0 hrbrthemes_0.8.0  forcats_0.5.1     stringr_1.4.0    
##  [8] dplyr_1.0.9       purrr_0.3.4       readr_2.1.2       tidyr_1.2.0       tibble_3.1.7      tidyverse_1.3.1   ggplot2_3.3.6    
## 
## loaded via a namespace (and not attached):
##   [1] rappdirs_0.3.3                           rtracklayer_1.56.1                       bit64_4.0.5                             
##   [4] knitr_1.39                               DelayedArray_0.22.0                      data.table_1.14.2                       
##   [7] rpart_4.1.16                             KEGGREST_1.36.2                          RCurl_1.98-1.7                          
##  [10] generics_0.1.3                           BiocGenerics_0.42.0                      GenomicFeatures_1.48.3                  
##  [13] RSQLite_2.2.14                           shadowtext_0.1.2                         bit_4.0.4                               
##  [16] tzdb_0.3.0                               enrichplot_1.16.1                        xml2_1.3.3                              
##  [19] lubridate_1.8.0                          httpuv_1.6.5                             SummarizedExperiment_1.26.1             
##  [22] assertthat_0.2.1                         xfun_0.31                                jquerylib_0.1.4                         
##  [25] hms_1.1.1                                evaluate_0.15                            promises_1.2.0.1                        
##  [28] fansi_1.0.3                              restfulr_0.0.15                          progress_1.2.2                          
##  [31] caTools_1.18.2                           dbplyr_2.2.1                             readxl_1.4.0                            
##  [34] igraph_1.3.2                             DBI_1.1.3                                geneplotter_1.74.0                      
##  [37] htmlwidgets_1.5.4                        stats4_4.2.1                             ellipsis_0.3.2                          
##  [40] crosstalk_1.2.0                          backports_1.4.1                          annotate_1.74.0                         
##  [43] gridBase_0.4-7                           biomaRt_2.52.0                           deldir_1.0-6                            
##  [46] MatrixGenerics_1.8.1                     vctrs_0.4.1                              Biobase_2.56.0                          
##  [49] abind_1.4-5                              cachem_1.0.6                             withr_2.5.0                             
##  [52] ggforce_0.3.3                            BSgenome_1.64.0                          genomation_1.28.0                       
##  [55] checkmate_2.1.0                          GenomicAlignments_1.32.0                 treeio_1.20.0                           
##  [58] prettyunits_1.1.1                        cluster_2.1.3                            DOSE_3.22.0                             
##  [61] ape_5.6-2                                lazyeval_0.2.2                           crayon_1.5.1                            
##  [64] genefilter_1.78.0                        pkgconfig_2.0.3                          labeling_0.4.2                          
##  [67] tweenr_1.0.2                             GenomeInfoDb_1.32.2                      nlme_3.1-158                            
##  [70] nnet_7.3-17                              rlang_1.0.4                              lifecycle_1.0.1                         
##  [73] downloader_0.4                           filelock_1.0.2                           extrafontdb_1.0                         
##  [76] BiocFileCache_2.4.0                      seqPattern_1.28.0                        modelr_0.1.8                            
##  [79] AnnotationHub_3.4.0                      cellranger_1.1.0                         polyclip_1.10-0                         
##  [82] matrixStats_0.62.0                       Matrix_1.4-1                             aplot_0.1.6                             
##  [85] carData_3.0-5                            boot_1.3-28                              reprex_2.0.1                            
##  [88] base64enc_0.1-3                          png_0.1-7                                rjson_0.2.21                            
##  [91] bitops_1.0-7                             KernSmooth_2.23-20                       Biostrings_2.64.0                       
##  [94] blob_1.2.3                               qvalue_2.28.0                            jpeg_0.1-9                              
##  [97] rstatix_0.7.0                            gridGraphics_0.5-1                       S4Vectors_0.34.0                        
## [100] ggsignif_0.6.3                           scales_1.2.0                             memoise_2.0.1                           
## [103] magrittr_2.0.3                           plyr_1.8.7                               gplots_3.1.3                            
## [106] zlibbioc_1.42.0                          compiler_4.2.1                           scatterpie_0.1.7                        
## [109] TxDb.Hsapiens.UCSC.hg38.knownGene_3.15.0 BiocIO_1.6.0                             RColorBrewer_1.1-3                      
## [112] plotrix_3.8-2                            DESeq2_1.36.0                            Rsamtools_2.12.0                        
## [115] cli_3.3.0                                XVector_0.36.0                           patchwork_1.1.1                         
## [118] htmlTable_2.4.1                          Formula_1.2-4                            MASS_7.3-57                             
## [121] tidyselect_1.1.2                         stringi_1.7.8                            highr_0.9                               
## [124] yaml_2.3.5                               GOSemSim_2.22.0                          locfit_1.5-9.6                          
## [127] latticeExtra_0.6-30                      ggrepel_0.9.1                            grid_4.2.1                              
## [130] sass_0.4.1                               fastmatch_1.1-3                          tools_4.2.1                             
## [133] parallel_4.2.1                           rstudioapi_0.13                          foreign_0.8-82                          
## [136] TxDb.Hsapiens.UCSC.hg19.knownGene_3.2.2  gridExtra_2.3                            BRGenomics_1.8.0                        
## [139] plyranges_1.16.0                         farver_2.1.1                             ggraph_2.0.5                            
## [142] digest_0.6.29                            BiocManager_1.30.18                      shiny_1.7.1                             
## [145] Rcpp_1.0.9                               GenomicRanges_1.48.0                     car_3.1-0                               
## [148] broom_1.0.0                              BiocVersion_3.15.2                       later_1.3.0                             
## [151] org.Hs.eg.db_3.15.0                      httr_1.4.3                               gdtools_0.2.4                           
## [154] AnnotationDbi_1.58.0                     colorspace_2.0-3                         rvest_1.0.2                             
## [157] XML_3.99-0.10                            fs_1.5.2                                 IRanges_2.30.0                          
## [160] splines_4.2.1                            yulab.utils_0.0.5                        tidytree_0.3.9                          
## [163] graphlayouts_0.8.0                       ggplotify_0.1.0                          plotly_4.10.0                           
## [166] systemfonts_1.0.4                        xtable_1.8-4                             jsonlite_1.8.0                          
## [169] ggtree_3.4.0                             tidygraph_1.2.1                          UpSetR_1.4.0                            
## [172] ggfun_0.0.6                              R6_2.5.1                                 Hmisc_4.7-0                             
## [175] pillar_1.7.0                             htmltools_0.5.2                          mime_0.12                               
## [178] glue_1.6.2                               fastmap_1.1.0                            clusterProfiler_4.4.4                   
## [181] BiocParallel_1.30.3                      interactiveDisplayBase_1.34.0            codetools_0.2-18                        
## [184] ChIPseeker_1.32.0                        fgsea_1.22.0                             utf8_1.2.2                              
## [187] bslib_0.3.1                              lattice_0.20-45                          curl_4.3.2                              
## [190] gtools_3.9.3                             GO.db_3.15.0                             Rttf2pt1_1.3.10                         
## [193] interp_1.1-2                             survival_3.3-1                           rmarkdown_2.14                          
## [196] munsell_0.5.0                            DO.db_2.9                                GenomeInfoDbData_1.2.8                  
## [199] impute_1.70.0                            haven_2.5.0                              reshape2_1.4.4                          
## [202] gtable_0.3.0                             extrafont_0.18